# coding:utf8

# 求出字符串中最后一个字符的长度
# a = input().split()
# print(len(a[-1]))

# 数字颠倒
arr = []
num = input('输入：')
for i in range(len(num)):
    print(num[len(num) - 1 - i])
    arr.append(num[len(num) - 1 - i])
print(''.join(arr))
